package cn.ming.leo.utils;

import java.util.List;

import com.avaje.ebean.PagedList;

/**
 * @author liaozhida 分页模型
 * @param <T>
 */
public class ManagerPage<T> {
	// 总条数
	private int recordsTotal;
	private int recordsFiltered;
	// 集合
	private List<T> list;

	private String draw;

	public ManagerPage() {
	}

	public ManagerPage(PagedList<T> pl, String draw) {
		pl.getTotalPageCount();
		this.recordsTotal = pl.getTotalRowCount();
		this.recordsFiltered = pl.getTotalRowCount();
		this.list = pl.getList();
		this.draw = draw;
	}

	public int getRecordsTotal() {
		return recordsTotal;
	}

	public void setRecordsTotal(int recordsTotal) {
		this.recordsTotal = recordsTotal;
	}

	public int getRecordsFiltered() {
		return recordsFiltered;
	}

	public void setRecordsFiltered(int recordsFiltered) {
		this.recordsFiltered = recordsFiltered;
	}

	public List<T> getList() {
		return list;
	}

	public void setList(List<T> list) {
		this.list = list;
	}

	public String getDraw() {
		return draw;
	}

	public void setDraw(String draw) {
		this.draw = draw;
	}

}
